wissel.net

Usability - Productivity - Business - The web - Singapore & Twins

Run <strike>SUN</strike>ORACLE VirtualBox with KVM modules on


KVM and VirtualBox are two virtualization solutions for Linux. KVM requires the module kvm_intel to be loaded, while VirtualBox can't run with the module running. So if you can't makeup your mind what to use, you need a little script magic to get this working. Here are the steps:
  1. Download libnotify for nice bubble notifications (just eye candy):
    sudo apt-get install libnotify (Of course you can use the Synaptics package manager in System-Administration and simply search for the library, but that's not sporty)
  2. Create a script (see below) in ~/bin/vboxkvm
  3. Make it executable with chmod +x ~/bin/vboxkvm
  4. Change the command in the VirtualBox menu entry from VirtualBox to vboxkvm
The script (Keep in mind that Linux is cAsEsEnsItIvE):
#!/bin/sh
SERVICE= 'kvm'
 
if ps ax | grep -v grep | grep $SERVICE > /dev /null
then
    notify-send -t 10000 -u low -i gtk-dialog-info "Removing kvm and starting Virtualbox"
   gksu "modprobe -r kvm_intel"
else
    notify-send -t 10000 -u low -i gtk-dialog-info "OK kvm not loaded,  Virtualbox starting"
fi
VirtualBox $
As usual: YMMV

Posted by on 19 July 2010 | Comments (0) | categories: Linux

Comments

  1. No comments yet, be the first to comment